package main;

import java.util.ArrayList;
import java.util.List;
import java.util.Set;

public class Main {

    public static void main(String[] args) {
        try {
            Reader reader = new Reader("D:\\java\\wiki\\wiki.txt");
            List<String> lines = reader.read();
            List<List<String>> list = reader.parse(lines);
            List<Article> articles = reader.getArticles(list);
            Wiki wiki = new Wiki(articles);
            System.out.println(wiki.synonymsMap);
            wiki.linkageAllArticles();
            Writer writer = new Writer(wiki);
            writer.write("D:\\wiki.txt");
        }
        catch (Exception e) {
            System.out.println(e);
        }

    }
}
